package com.xiaodao.cglibtest;

import org.springframework.cglib.proxy.Enhancer;

/**
 * Created by xiaodao
 * date: 2019/12/16
 */
public class TestCglib {

	public static void main(String[] args) {
/*		Enhancer  enhancer = new Enhancer();
		enhancer.setSuperclass(EE.class);
		enhancer.setCallback(new MethodInterceptor());
		EE aClass =(EE) enhancer.create();
		aClass.aa();*/

		Enhancer enhancer = new Enhancer();
		enhancer.setSuperclass(EE.class);
		enhancer.setCallback(new MethodInterceptor());
		EE proxyObj = (EE) enhancer.create();
		proxyObj.aa();

	}
}
